<%@ Import Namespace="UCommerce.Presentation.Web"%>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditPriceGroupBaseProperties.ascx.cs" Inherits="UCommerce.Web.UI.Settings.Catalog.EditPriceGroupBaseProperties" %>
<%@ Register tagPrefix="commerce" tagName="ValidationSummary" src="../../Controls/ValidationSummaryDisplay.ascx" %>

<commerce:ValidationSummary ID="ValidationSummary1" runat="server" />
<div class="propertyPane leftAligned">
    <div class="propertyItem">
        <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="Name" />
        </div>
        <div class="propertyItemContent">
            <asp:TextBox runat="server" ID="NameTextBox" Text="<%# View.IsNew ? QueryString.Common.Name : View.PriceGroup.Name %>" CssClass="mediumWidth" />
            <asp:RequiredFieldValidator runat="server" ControlToValidate="NameTextBox" Text="*" ErrorMessage='<%# GetLocalResourceObject("Name.Text") %>' CssClass="validator" />
            <asp:CustomValidator runat="server" Text="*" ErrorMessage='<%# GetLocalResourceObject("Name.Text") %>' CssClass="validator" OnServerValidate="NameValidator_ServerValidate" />
			<asp:CustomValidator runat="server" ControlToValidate="NameTextBox" Display="Static" id="LicenseValidator" ErrorMessage="Your license does not support creating any more." CssClass="validator" OnServerValidate="LicenseCheckValidator_ServerValidate"/>
        </div>
    </div>
    <div class="propertyItem">
	    <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="Description" />                    
        </div>
        <div class="propertyItemContent">
            <asp:TextBox runat="server" ID="DescriptionTextBox" Text="<%# View.PriceGroup.Description %>" TextMode="MultiLine" CssClass="mediumWidth smallHeight" />
        </div>
    </div>        
    <div class="propertyItem">
	    <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="LastModifiedOn" />                    
        </div>
        <div class="propertyItemContent">
            <asp:Label runat="server" Text="<%# View.IsNew ? String.Empty : View.PriceGroup.ModifiedOn.ToString() %>" />
        </div>
    </div>        
    <div class="propertyItem">
	    <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="LastModifiedBy" />
        </div>
        <div class="propertyItemContent">
            <%# View.PriceGroup.ModifiedBy %>
        </div>
    </div>
    <div class="propertyPaneFooter">-</div>
</div>

<div class="propertyPane leftAligned">
    <div class="propertyItem">
	    <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="Currency" />
        </div>
        <div class="propertyItemContent">
            <asp:DropDownList runat="server" ID="CurrencyDropDownList" DataSource="<%# View.Currencies %>" DataValueField="CurrencyId" DataTextField="ISOCode"></asp:DropDownList>
			<asp:CustomValidator runat="server" ErrorMessage="*" CssClass="validator" OnServerValidate="LicenseValidator_ServerValidate" meta:ResourceKey="LicenseValidator" />
        </div>
    </div>
    <div class="propertyItem">
	    <div class="propertyItemHeader">
            <asp:Localize runat="server" meta:resourceKey="VatRate" />      
        </div>
        <div class="propertyItemContent">
            <asp:TextBox runat="server" ID="VatRateTextBox" Text="<%# View.PriceGroup.VATRate * 100 %>" />&nbsp;%
            <asp:RangeValidator runat="server" ControlToValidate="VatRateTextBox" Type="Double" MinimumValue="0" MaximumValue="<%# 999 %>" ErrorMessage="*" CssClass="validator" />
        </div>
    </div>
    <div class="propertyPaneFooter">-</div>
</div>